﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using SMS.MODEL;
using System.Windows.Controls;

namespace SMS.APP.ViewModel
{
    internal class mainMenu
    {

        public List<MainMenu> MainMenus
        {
            get;
            set;
        }

        public mainMenu()
        {
            SmsServiceProxy<ISMSSERVICE> smsServiceProxy = new SmsServiceProxy<ISMSSERVICE>();

            MainMenus = smsServiceProxy.CustomChannel.getMainMenu();

        }

        internal ContentControl getControltoView(string controlName, Type type)
        {

            Assembly assembly = type.Assembly;
            string userControlFullName = String.Format("{0}.{1}", type.Namespace, controlName);
            UserControl userControl = (UserControl)assembly.CreateInstance(userControlFullName);
            return userControl;

        }


    }
}
